package com.benchmark.springboot.enums;

import com.power.common.interfaces.IMessage;

/**
 * Error code enum
 *
 * @author yu on 2018/09/03.
 */
public enum ErrorCodeEnum implements IMessage {

    TIME_OUT("1003", "任务超时"),
    JOB_ERROR("1005", "启动任务失败");

    private String code;

    private String desc;

    ErrorCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return this.code;
    }


    public String getMessage() {
        return desc;
    }

    @Override
    public String toString() {
        return "[" + this.code + "]" + this.desc;
    }
}
